<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>遥控赛车控制台</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">
        <div class="video-container">
            <video id="video" autoplay playsinline></video>
            <div class="overlay-stats">
                <div>距离: <span id="distance">--</span> cm</div>
                <div>温度: <span id="temperature">--</span> °C</div>
                <div>速度限制: <span id="speed-limit">200</span></div>
            </div>
        </div>
        
        <div class="control-panel">
            <div class="d-pad">
                <button id="btn-up" class="arrow-btn">↑</button>
                <div>
                    <button id="btn-left" class="arrow-btn">←</button>
                    <button id="btn-stop" class="stop-btn">STOP</button>
                    <button id="btn-right" class="arrow-btn">→</button>
                </div>
                <button id="btn-down" class="arrow-btn">↓</button>
            </div>
            
            <div class="config-section">
                <label>最大速度: <span id="speed-value">200</span></label>
                <input type="range" id="speed-slider" min="50" max="255" value="200">
                
                <label>安全距离: <span id="distance-value">15</span> cm</label>
                <input type="range" id="distance-slider" min="5" max="50" value="15">
            </div>
            
            <div class="connection-status">
                <span>状态: </span>
                <span id="status">未连接</span>
            </div>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/socket.io-client@4.7.4/dist/socket.io.min.js"></script>
    <script src="script.js"></script>
</body>
</html>